import FetchAgent from '@pluve/fetch';
FetchAgent.setDebug(false);
FetchAgent.setTimeout(15000);

// 请求前置拦截器
FetchAgent.setupReqInterceptor(
    config => {
        (config.headers as any)['Content-Type'] = 'application/json';   //charset=UTF-8
        // (config.headers as any)['withCredentials'] = true;
        (config as any)['credentials'] = 'include';
        return false;
    }
);

export default FetchAgent;
